<!DOCTYPE html>
<!--suppress ALL -->
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <title id="title">swagger-ui-zfs</title>
    <link href="/static/plugins/css/bootstrap.css" rel="stylesheet">
    <link href="/static/plugins/template/css/font-awesome.min.css?v=4.4.0" rel="stylesheet">
    <link href="/static/plugins/template/css/plugins/iCheck/custom.css" rel="stylesheet">
    <link href="/static/plugins/template/css/plugins/json-view/jquery.json-viewer.css" rel="stylesheet">
    <link href="/static/plugins/template/css/animate.min.css" rel="stylesheet">
    <link href="/static/plugins/template/css/style.min.css?v=4.1.0" rel="stylesheet">
    <link href="/static/css/swagger-zfs-ui.css" rel="stylesheet">
</head>
<body>
<div id="rootDiv" class="row">
    <!--描述-->
    <div class="col-sm-12 page-header" v-if="apiDocs">
        <div class="col-sm-3 margins-left-1">
            <h3 class="titleCss" :title="apiDocs.info.title">{{apiDocs.info.title}}</h3>
            <h5 class="titleCss" :title="apiDocs.info.description">{{apiDocs.info.description}}</h5>
            <h5 class="titleCss" :title="apiDocs.info.version">version: {{apiDocs.info.version}}</h5>
            <h5 class="title">author: <i v-for="(author,name,index) in apiDocs.info.contact">{{author}}</i></h5>
        </div>
        <div class="col-sm-3">
            <select id="swaggerResources" class="form-control m-b">
                <option v-for="swaggerResource in swaggerResources">{{swaggerResource.location}}</option>
            </select>
            <button type="button" class="btn" onclick="setCookieModalShow()">Set Cookie</button>
            <button type="button" class="btn" onclick="setHeaderModalShow()">Set Header</button>
        </div>
    </div>
    <div class="col-sm-12 tabs-container" v-if="apiDocs">
        <div class="tabs-left">
            <ul class="nav nav-tabs" v-if="apiDocs.tags">
                <li v-for="(swaggerResource,srkIndex) in apiDocs.tags" :class="{'active':srkIndex==0}">
                    <a data-toggle="tab" :href="'#tab-tag-'+srkIndex" class="titleCss" :titls="swaggerResource.name +' : '+swaggerResource.description">{{swaggerResource.name}} : {{swaggerResource.description}}</a>
                </li>
            </ul>
            <div class="tab-content" v-if="apiDocs.tags">
                <div v-for="(swaggerResource,srkIndex) in apiDocs.tags" :id="'tab-tag-'+srkIndex" :class="{'active':srkIndex==0}" class="tab-pane">
                    <div class="panel-body">
                        <!---->
                        <div class="tabs-left">
                            <ul class="nav nav-tabs" v-if="apiDocs.paths">
                                <li v-for="(path,pathIndex) in apiDocs.paths" class="tab-pane" v-if="path.tags.indexOf(swaggerResource.name) > -1">
                                    <a data-toggle="tab" :href="'#tab-'+srkIndex+'-'+pathIndex" class="titleCss" :title="path.url +' : ' +path.description">{{path.url}} : {{path.description}}</a>
                                </li>
                            </ul>
                            <div class="tab-content" v-if="apiDocs.paths">
                                <div v-for="(path,pathIndex) in apiDocs.paths" :id="'tab-'+srkIndex+'-'+pathIndex" class="tab-pane">
                                    <form :id="swaggerResource.name + '-' +path.operationId">
                                        <div class="panel-body">
                                            <div class="col-sm-12">
                                                <!--请求方式-->
                                                <div class="col-sm-2">
                                                    <select class="form-control mySelected1" id="type" name="type">
                                                        <option v-for="(type,typeIndex) in path.type" :value="type">{{type}}</option>
                                                    </select>
                                                </div>
                                                <div class="col-sm-3">
                                                    <select class="form-control mySelected1" id="contentType" name="contentType" v-if="path.produces">
                                                        <option v-for="(produce,produceIndex) in path.produces" :value="produce">{{produce}}</option>
                                                    </select>
                                                </div>
                                                <div class="col-sm-3 pull-right titleCss" :title="path.summary">{{path.summary}}</div>
                                            </div>
                                            <div class="hr-line-dashed col-sm-12"></div>
                                            <div class="col-sm-12">
                                                <div class="ibox float-e-margins">
                                                    <div class="ibox-title">
                                                        <h5>Parameters</h5>
                                                    </div>
                                                    <div class="ibox-content">
                                                        <table class="table table-hover">
                                                            <thead>
                                                            <tr>
                                                                <th>Parameter</th>
                                                                <th>Value</th>
                                                                <th>Description</th>
                                                                <th>Parameter Type</th>
                                                                <th>Data Type</th>
                                                            </tr>
                                                            </thead>
                                                            <tbody>
                                                            <tr v-for="(k,v) in path.parameters">
                                                                <td><span class="line">{{k.name}}</span>
                                                                <td><span class="line"><input type="text" :name="k.name" :required="k.required" :aria-required="k.required" :placeholder="k.required ? 'required' : ''"></span>
                                                                <td><span class="line">{{k.description}}</span>
                                                                <td><span class="line">{{k.in}}</span>
                                                                <td><span class="line">{{k.type}}</span>
                                                            </tr>
                                                            </tbody>
                                                        </table>
                                                        <button type="button" class="btn" v-on:click="submit(swaggerResource.name + '-' + path.operationId,path.url)">Submit</button>
                                                    </div>
                                                </div>
                                                <div class="ibox float-e-margins">
                                                    <div class="ibox-title">
                                                        <h5>Response Body</h5>
                                                    </div>
                                                    <div class="ibox-content">
                                                        <pre :id="'rbc-'+swaggerResource.name + '-' + path.operationId"></pre>
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="hr-line-dashed col-sm-12"></div>
                                            <!--response -->
                                            <div class="col-sm-5">
                                                <div class="tabs-container">
                                                    <ul class="nav nav-tabs">
                                                        <li class="active">
                                                            <a data-toggle="tab" href="#tab-1" aria-expanded="true"> Response Class (status 200) json</a>
                                                        </li>
                                                    </ul>
                                                    <div class="tab-content">
                                                        <div id="tab-1" class="tab-pane active">
                                                            <div class="panel-body" style="margin-left: 0;width: 100%;padding: 5px;height: 200px;">
                                                                <pre class="overflow-scroll-185"><code>{{path.responses | formatModel}}</code></pre>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="col-sm-7">
                                                <div class="tabs-container">
                                                    <ul class="nav nav-tabs">
                                                        <li class="active">
                                                            <a data-toggle="tab" href="#tab-1" aria-expanded="true"> Response Messages Other Status</a>
                                                        </li>
                                                    </ul>
                                                    <div class="tab-content">
                                                        <div id="tab-1" class="tab-pane active">
                                                            <div class="panel-body" style="margin-left: 0;width: 100%;padding: 5px;height: 200px;">
                                                                <div class="ibox float-e-margins pre-scrollable" style="height: 180px">
                                                                    <div class="ibox-content">
                                                                        <table class="table table-hover">
                                                                            <thead>
                                                                            <tr>
                                                                                <th>Status</th>
                                                                                <th>Reason</th>
                                                                                <th>Response Model Type</th>
                                                                                <th>Headers</th>
                                                                            </tr>
                                                                            </thead>
                                                                            <tbody v-if="path.responses">
                                                                            <tr v-for="(sProper,status) in path.responses">
                                                                                <td >
                                                                                    <span class="line">{{status}}</span>
                                                                                </td>
                                                                                <td >
                                                                                    <span class="line">{{sProper.description}}</span>
                                                                                </td>
                                                                                <td >
                                                                                    <span class="line">{{sProper.schema | schemaFormat}}</span>
                                                                                </td>
                                                                                <td >
                                                                                    <span class="line"></span>
                                                                                </td>
                                                                            </tr>
                                                                            </tbody>
                                                                        </table>
                                                                    </div>
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="hr-line-dashed col-sm-12"></div>
                                        </div>
                                    </form>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<!---->
<div class="modal inmodal fade" id="setCookie" tabindex="-1" role="dialog"  aria-hidden="true" data-backdrop="false">
    <div class="modal-dialog modal-lg">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
                <h5 class="modal-title">Set Cookie</h5>
            </div>
            <div class="ibox-content">
                <div class="ibox float-e-margins">
                    <div class="ibox-content">
                        <table class="table table-hover">
                            <thead>
                            <tr>
                                <th>#</th>
                                <th>Key</th>
                                <th>Value</th>
                                <th>Delete</th>
                            </tr>
                            </thead>
                            <tbody id="cookie">

                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-primary" onclick="addCokie()"> Add </button>
                <button type="button" class="btn btn-white" data-dismiss="modal">Close</button>
            </div>
        </div>
    </div>
</div>
<!---->
<div class="modal inmodal fade" id="setHeader" tabindex="-1" role="dialog"  aria-hidden="true" data-backdrop="false">
    <div class="modal-dialog modal-lg">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
                <h5 class="modal-title">Set Header</h5>
            </div>
            <div class="ibox-content">
                <div class="ibox float-e-margins">
                    <div class="ibox-content">
                        <table class="table table-hover">
                            <thead>
                            <tr>
                                <th>#</th>
                                <th>Key</th>
                                <th>Value</th>
                                <th>Delete</th>
                            </tr>
                            </thead>
                            <tbody id="header">

                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-primary" onclick="addHeader()"> Add </button>
                <button type="button" class="btn btn-white" data-dismiss="modal">Close</button>
            </div>
        </div>
    </div>
</div>
</body>
<script src="/static/plugins/js/jquery.js"></script>
<script src="/static/plugins/template/plugins/fullavatareditor/scripts/jQuery.Cookie.js"></script>
<script src="/static/plugins/js/bootstrap.js"></script>
<script src="/static/plugins/template/js/content.min.js?v=1.0.0"></script>
<script src="/static/plugins/template/js/plugins/iCheck/icheck.min.js"></script>
<script src="/static/plugins/template/js/plugins/json-view/jquery.json-viewer.js"></script>
<script src="/static/plugins/template/js/content.min.js?v=1.0.0"></script>
<script src="/static/plugins/js/vue.js"></script>
<script src="/static/js/swagger-zfs-ui.js"></script>
<script src="/static/js/swagger-zfs-cookie.js"></script>
<script src="/static/js/swagger-zfs-header.js"></script>
</html>